home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4249 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.rain.org!usenet
  2. From: "Guus Leeuw jr." <guusl@eiffel.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help about the sin() with linux
  5. Date: Fri, 02 Feb 1996 13:33:25 -0800
  6. Organization: Interactive Software Engineering Inc. hhtp://www.eiffel.com/
  7. Message-ID: <31128325.148C09B8@eiffel.com>
  8. References: <4e2eur$50@avalon.imaginet.fr> <4ehtg6$8j4@hdxx05.telecom.ptt.nl> <4elm7v$c9p@airdmhor.gen.nz> <310F6FBB.2EF2@cmt.lpr.mail.carel.fi>
  9. NNTP-Posting-Host: @outback.eiffel.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b3 (X11; I; Linux 1.2.8 i586)
  14.  
  15. Ari Lukumies wrote:
  16. > Simon Hosie wrote:
  17. > >
  18. > > Andre Broers:
  19. > > > You have to link the math library with your program. I hope that will
  20. > > > work.
  21. > >
  22. > >   Where is it??  Where is it??  Tell me, damn you.. I must know!!
  23. > The libraries are usually in /usr/lib. Usually in *nix the switch -lm in cc command
  24. > line is enough to link the math lib, if the environment variable LIB is pointing to
  25. > the right directory. You can check where the library actually is by doing find ./
  26. > -name libm.a -print. libm.a is usually the name of the math library; in some
  27. > systems it may have another name, though.
  28.  
  29. Well, I'm running Linux (which is a *nix), and don't have a LIB environment variable,
  30. but still my cc / gcc can (I repeat _can_) find the library only by calling
  31. `gcc -o foo bar.c -lm'
  32.  
  33. Most cc/gcc compilers on *nix assume the libraries are in /usr/lib.
  34.  
  35. Later,
  36.     Guus
  37.